import axios from './axios'
export default {
    //获取列表
    getList() {
        return axios.get(`categories`)
    },
    //获取参数列表
    getParams(cateId,activeName){
        return axios.get(`categories/${cateId}/attributes`,activeName)
    },
    //添加参数
    addParam(cateId,form){
        return axios.post(`categories/${cateId}/attributes`,form)
    },
    //修改参数
    editParam(cateId,id,form){
        return axios.put(`categories/${cateId}/attributes/${id}`,form)
    },
    //删除参数
    removeParam(cateId,id){
        return axios.delete(`categories/${cateId}/attributes/${id}`)
    },
    //修改参数tag
    editInput(cateId,row){
        return axios.put(`categories/${cateId}/attributes/${row}`)
    },
    //修改的对话框
    showEdit(cateId,attrId,form){
        return axios.get(`categories/${cateId}/attributes/${attrId}`,form)
    }
}